home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 3
/
Info_Mac_1994-01.iso
/
Development
/
General
/
GCC 1.37.1r15
/
GCC.MPW
/
Makefile
< prev
next >
Wrap
Makefile
|
1993-03-15
|
14KB
|
398 lines
# GCC Makefile. Builds all parts of a working MPW GCC.
# Copyright © 1989, 1990 Apple Computer, Inc.
# Change this to target GCC to other machines.
machine = ::GCC.MPW:
# Change this if you want to use a non-"parallel" folder for the common sources.
s = ::Sources:
t = :Tmp:
o = :Obj:
g = :Gen:
# config.h and tm.h are not normally listed as dependencies, even though most files
# include both of them. The problem is that they contain both definitions that
# have consequences throughout GCC, and ones that affect only one or two files.
# It's generally more practical to just delete the .o files you know to be affected,
# and rely on CleanGCC to blast everything, but uncommenting this definition will
# add dependencies everywhere that these files are included.
Configs = # "{machine}"config.h "{machine}"tm.h
# Set up the default relation between source and object files.
"{o}" ƒ : "{s}" "{machine}" "{t}"
# The following section is correct for when MPW C compiles GCC, but will be
# modified by a script to do the self-compilation stages.
### Funky Stuff!
# Options for MPW C to compile MPW GCC code.
COptions = -mc68020 -mc68881 -b -m -w -d MPW_C -d MPW -i "{s},{machine},{t}"
### End of Funky Stuff!
# Default rule that puts each file into separate segment.
.c.o ƒ .c
{C} {DepDir}{Default}.c {COptions} -s {Default} -o {TargDir}{Default}.c.o
# Default rule for a performance-measured file.
.c.po ƒ .c
{C} {DepDir}{Default}.c {COptions} -d PERFORMANCE -s {Default} -o {TargDir}{Default}.c.po
# Everything we build in this file is a tool.
LinkOptions = -w -c 'MPS ' -t MPST
# Libraries that all of our tools want to use.
COMLIBS = ∂
"{Libraries}"Stubs.o ∂
"{CLibraries}"CLib881.o ∂
"{Libraries}"Runtime.o ∂
"{Libraries}"Interface.o ∂
"{CLibraries}"StdCLib.o ∂
"{CLibraries}"CSANELib881.o ∂
"{CLibraries}"Math881.o ∂
"{Libraries}"ToolLibs.o
DRVOBJECTS = ∂
"{o}"version.c.o ∂
"{o}"driver.c.o
"{o}"driver.c.o ƒ "{s}"driver.c
driver ƒƒ {DRVOBJECTS}
Link {LinkOptions} {DRVOBJECTS} {COMLIBS} -o driver
driver ƒƒ "{machine}"Versions.r
Rez -rd -o driver "{machine}"Versions.r -append
# C preprocessor stuff.
CPPOBJECTS = ∂
"{o}"cccp.c.o ∂
"{o}"cexp.c.o ∂
"{o}"obstack.c.o ∂
"{o}"alloca.c.o ∂
"{o}"fopen.c.o ∂
"{o}"version.c.o
"{t}"cexp.c ƒ "{s}"cexp.y
Bison -o "{t}"cexp.c "{s}"cexp.y
"{o}"cccp.c.o ƒ "{s}"cccp.c {Configs}
"{o}"cexp.c.o ƒ "{t}"cexp.c {Configs}
# Produce the preprocessor program.
cpp ƒƒ {CPPOBJECTS}
Link {LinkOptions} {CPPOBJECTS} {COMLIBS} -o cpp
cpp ƒƒ "{machine}"Versions.r
Rez -rd -o cpp "{machine}"Versions.r -append
# Insn-... C file stuff.
COMOBJS = ∂
"{o}"rtl.c.o ∂
"{o}"obstack.c.o ∂
"{o}"alloca.c.o ∂
"{o}"fopen.c.o
# Support routines and libraries for the generating programs.
"{o}"gencodes.c.o ƒ "{s}"gencodes.c "{s}"rtl.h {Configs}
"{o}"genconfig.c.o ƒ "{s}"genconfig.c "{s}"rtl.h {Configs}
"{o}"genemit.c.o ƒ "{s}"genemit.c "{s}"rtl.h {Configs}
"{o}"genextract.c.o ƒ "{s}"genextract.c "{s}"rtl.h {Configs}
"{o}"genflags.c.o ƒ "{s}"genflags.c "{s}"rtl.h {Configs}
"{o}"genoutput.c.o ƒ "{s}"genoutput.c "{s}"rtl.h {Configs}
"{o}"genpeep.c.o ƒ "{s}"genpeep.c "{s}"rtl.h {Configs}
"{o}"genrecog.c.o ƒ "{s}"genrecog.c "{s}"rtl.h {Configs}
# How to build the programs themselves.
"{g}"gencodes ƒ "{o}"gencodes.c.o {COMOBJS}
Link {LinkOptions} "{o}"gencodes.c.o {COMOBJS} {COMLIBS} -o "{g}"gencodes
"{g}"genconfig ƒ "{o}"genconfig.c.o {COMOBJS}
Link {LinkOptions} "{o}"genconfig.c.o {COMOBJS} {COMLIBS} -o "{g}"genconfig
"{g}"genemit ƒ "{o}"genemit.c.o {COMOBJS}
Link {LinkOptions} "{o}"genemit.c.o {COMOBJS} {COMLIBS} -o "{g}"genemit
"{g}"genextract ƒ "{o}"genextract.c.o {COMOBJS}
Link {LinkOptions} "{o}"genextract.c.o {COMOBJS} {COMLIBS} -o "{g}"genextract
"{g}"genflags ƒ "{o}"genflags.c.o {COMOBJS}
Link {LinkOptions} "{o}"genflags.c.o {COMOBJS} {COMLIBS} -o "{g}"genflags
"{g}"genoutput ƒ "{o}"genoutput.c.o {COMOBJS}
Link {LinkOptions} "{o}"genoutput.c.o {COMOBJS} {COMLIBS} -o "{g}"genoutput
"{g}"genpeep ƒ "{o}"genpeep.c.o {COMOBJS}
Link {LinkOptions} "{o}"genpeep.c.o {COMOBJS} {COMLIBS} -o "{g}"genpeep
"{g}"genrecog ƒ "{o}"genrecog.c.o {COMOBJS}
Link {LinkOptions} "{o}"genrecog.c.o {COMOBJS} {COMLIBS} -o "{g}"genrecog
# The machine-specific C files are dependent on both the machine description
# and the gen... programs, but MPW makefiles only calculate dependencies once
# before building, so we take "md" out of explicit dependencies and make the
# "insn" target for it instead (see below).
"{t}"insn-codes.h ƒ "{g}"gencodes
"{g}"gencodes "{machine}"md >"{t}"insn-codes.h
"{t}"insn-config.h ƒ "{g}"genconfig
"{g}"genconfig "{machine}"md >"{t}"insn-config.h
"{t}"insn-emit.c ƒ "{g}"genemit
"{g}"genemit "{machine}"md >"{t}"insn-emit.c
"{t}"insn-extract.c ƒ "{g}"genextract
"{g}"genextract "{machine}"md >"{t}"insn-extract.c
"{t}"insn-flags.h ƒ "{g}"genflags
"{g}"genflags "{machine}"md >"{t}"insn-flags.h
"{t}"insn-output.c ƒ "{g}"genoutput
"{g}"genoutput "{machine}"md >"{t}"insn-output.c
"{t}"insn-peep.c ƒ "{g}"genpeep
"{g}"genpeep "{machine}"md >"{t}"insn-peep.c
"{t}"insn-recog.c ƒ "{g}"genrecog
"{g}"genrecog "{machine}"md >"{t}"insn-recog.c
# Generate all the derived files from md, but only update them if the contents are
# actually different (often they're not). This should be run after md is updated,
# then making cc1 will only do the minimum build necessary.
insn ƒ "{machine}"md
"{g}"gencodes "{machine}"md >"{t}"tmp-insn-codes.h
MoveIfChange "{t}"tmp-insn-codes.h "{t}"insn-codes.h
"{g}"genconfig "{machine}"md >"{t}"tmp-insn-config.h
MoveIfChange "{t}"tmp-insn-config.h "{t}"insn-config.h
"{g}"genemit "{machine}"md >"{t}"tmp-insn-emit.c
MoveIfChange "{t}"tmp-insn-emit.c "{t}"insn-emit.c
"{g}"genextract "{machine}"md >"{t}"tmp-insn-extract.c
MoveIfChange "{t}"tmp-insn-extract.c "{t}"insn-extract.c
"{g}"genflags "{machine}"md >"{t}"tmp-insn-flags.h
MoveIfChange "{t}"tmp-insn-flags.h "{t}"insn-flags.h
"{g}"genoutput "{machine}"md >"{t}"tmp-insn-output.c
MoveIfChange "{t}"tmp-insn-output.c "{t}"insn-output.c
"{g}"genpeep "{machine}"md >"{t}"tmp-insn-peep.c
MoveIfChange "{t}"tmp-insn-peep.c "{t}"insn-peep.c
"{g}"genrecog "{machine}"md >"{t}"tmp-insn-recog.c
MoveIfChange "{t}"tmp-insn-recog.c "{t}"insn-recog.c
# Main C compiler stuff.
CC1OBJECTS = ∂
"{o}"alloca.c.o ∂
"{o}"c-convert.c.o ∂
"{o}"c-decl.c.o ∂
"{o}"c-parse.tab.c.o ∂
"{o}"c-typeck.c.o ∂
"{o}"caller-save.c.o ∂
"{o}"combine.c.o ∂
"{o}"cse.c.o ∂
"{o}"dbranch.c.o ∂
"{o}"emit-rtl.c.o ∂
"{o}"explow.c.o ∂
"{o}"expmed.c.o ∂
"{o}"expr.c.o ∂
"{o}"final.c.o ∂
"{o}"flow.c.o ∂
"{o}"fold-const.c.o ∂
"{o}"fopen.c.o ∂
"{o}"global-alloc.c.o ∂
"{o}"insn-emit.c.o ∂
"{o}"insn-extract.c.o ∂
"{o}"insn-output.c.o ∂
"{o}"insn-peep.c.o ∂
"{o}"insn-recog.c.o ∂
"{o}"integrate.c.o ∂
"{o}"jump.c.o ∂
"{o}"local-alloc.c.o ∂
"{o}"loop.c.o ∂
"{o}"obstack.c.o ∂
"{o}"optabs.c.o ∂
"{o}"print-tree.c.o ∂
"{o}"recog.c.o ∂
"{o}"regclass.c.o ∂
"{o}"reload.c.o ∂
"{o}"reload1.c.o ∂
"{o}"rtl.c.o ∂
"{o}"rtlanal.c.o ∂
"{o}"stmt.c.o ∂
"{o}"stor-layout.c.o ∂
"{o}"stupid.c.o ∂
"{o}"parameter.c.o ∂
# Two version of toplev (regular and perf), so mentioned elsewhere ∂
# "{o}"toplev.c.o ∂
"{o}"tree.c.o ∂
"{o}"varasm.c.o ∂
"{o}"version.c.o
# Bison (not yacc) is needed to build the C parser.
"{t}"c-parse.tab.c ƒ "{s}"c-parse.y
Bison -v -o "{t}"c-parse.tab.c "{s}"c-parse.y
# Massive dependencies.
"{o}"parameter.c.o ƒ ∂
"{s}"parameter.c "{s}"obstack.h {Configs}
"{o}"c-convert.c.o ƒ ∂
"{s}"c-convert.c "{s}"tree.h {Configs}
"{o}"c-decl.c.o ƒ ∂
"{s}"c-decl.c "{s}"tree.h "{s}"flags.h "{s}"c-tree.h "{s}"c-parse.h {Configs}
"{o}"c-parse.tab.c.o ƒ ∂
"{t}"c-parse.tab.c "{s}"tree.h "{s}"real.h "{s}"input.h "{s}"c-parse.h ∂
"{s}"c-tree.h {Configs}
"{o}"c-typeck.c.o ƒ ∂
"{s}"c-typeck.c "{s}"tree.h "{s}"c-tree.h "{s}"flags.h {Configs}
"{o}"caller-save.c.o ƒ ∂
"{s}"caller-save.c "{s}"rtl.h "{t}"insn-config.h "{s}"flags.h "{s}"regs.h ∂
"{s}"hard-reg-set.h "{s}"reload.h "{s}"recog.h "{s}"basic-block.h {Configs}
"{o}"combine.c.o ƒ ∂
"{s}"combine.c "{s}"rtl.h "{s}"flags.h "{s}"regs.h "{s}"basic-block.h ∂
"{t}"insn-config.h "{s}"recog.h {Configs}
"{o}"cse.c.o ƒ ∂
"{s}"cse.c "{s}"rtl.h "{s}"regs.h "{s}"hard-reg-set.h "{s}"flags.h "{s}"real.h {Configs}
"{o}"dbranch.c.o ƒ ∂
"{s}"dbranch.c "{s}"rtl.h "{s}"hard-reg-set.h "{s}"flags.h {Configs}
"{o}"dbxout.c.o ƒ ∂
"{s}"dbxout.c "{s}"tree.h "{s}"rtl.h "{s}"rtl.def "{s}"flags.h {Configs}
"{o}"emit-rtl.c.o ƒ ∂
"{s}"gvarargs.h "{s}"rtl.h "{s}"regs.h "{t}"insn-config.h "{s}"real.h {Configs}
"{o}"explow.c.o ƒ ∂
"{s}"explow.c "{s}"rtl.h "{s}"tree.h "{s}"tree.def "{s}"real.h "{s}"flags.h ∂
"{s}"expr.h "{t}"insn-codes.h {Configs}
"{o}"expmed.c.o ƒ ∂
"{s}"rtl.h "{s}"tree.h "{s}"tree.def "{s}"real.h "{s}"flags.h "{t}"insn-flags.h ∂
"{t}"insn-codes.h "{t}"insn-config.h "{s}"expr.h "{s}"recog.h {Configs}
"{o}"expr.c.o ƒ ∂
"{s}"rtl.h "{s}"tree.h "{s}"flags.h "{t}"insn-flags.h "{t}"insn-codes.h "{s}"expr.h ∂
"{t}"insn-config.h "{s}"recog.h "{s}"gvarargs.h "{s}"typeclass.h {Configs}
"{o}"final.c.o ƒ ∂
"{s}"final.c "{s}"rtl.h "{s}"regs.h "{t}"insn-config.h "{s}"recog.h ∂
"{s}"conditions.h "{s}"gdbfiles.h "{s}"flags.h "{s}"real.h "{s}"output.h {Configs}
"{o}"flow.c.o ƒ ∂
"{s}"flow.c "{s}"rtl.h "{s}"basic-block.h "{s}"regs.h "{s}"hard-reg-set.h ∂
"{s}"flags.h "{s}"obstack.h {Configs}
"{o}"fold-const.c.o ƒ ∂
"{s}"fold-const.c "{s}"tree.h {Configs}
"{o}"global-alloc.c.o ƒ ∂
"{s}"global-alloc.c "{s}"rtl.h "{s}"flags.h "{s}"basic-block.h ∂
"{s}"hard-reg-set.h "{s}"regs.h "{t}"insn-config.h {Configs}
"{o}"insn-emit.c.o ƒ ∂
"{t}"insn-emit.c "{s}"rtl.h "{s}"expr.h "{t}"insn-codes.h "{s}"real.h ∂
"{t}"insn-config.h "{t}"insn-flags.h {Configs}
"{o}"insn-extract.c.o ƒ ∂
"{t}"insn-extract.c "{s}"rtl.h {Configs}
"{o}"insn-output.c.o ƒ ∂
"{t}"insn-output.c "{s}"rtl.h "{s}"regs.h "{s}"hard-reg-set.h "{s}"real.h ∂
"{s}"conditions.h "{t}"insn-flags.h "{t}"insn-config.h "{s}"output.h "{machine}"aux-output.c {Configs}
"{o}"insn-peep.c.o ƒ ∂
"{t}"insn-peep.c "{s}"rtl.h "{s}"regs.h "{s}"real.h {Configs}
"{o}"insn-recog.c.o ƒ ∂
"{t}"insn-recog.c "{s}"rtl.h "{t}"insn-config.h "{s}"recog.h "{s}"real.h {Configs}
"{o}"integrate.c.o ƒ ∂
"{s}"integrate.c "{s}"rtl.h "{s}"tree.h "{s}"tree.def "{s}"real.h ∂
"{s}"flags.h "{t}"insn-flags.h "{s}"expr.h "{t}"insn-codes.h "{s}"obstack.h {Configs}
"{o}"jump.c.o ƒ ∂
"{s}"jump.c "{s}"rtl.h "{s}"flags.h "{s}"regs.h {Configs}
"{o}"local-alloc.c.o ƒ ∂
"{s}"local-alloc.c "{s}"rtl.h "{s}"flags.h "{s}"basic-block.h ∂
"{s}"regs.h "{s}"hard-reg-set.h "{t}"insn-config.h "{s}"recog.h {Configs}
"{o}"loop.c.o ƒ ∂
"{s}"loop.c "{s}"rtl.h "{s}"expr.h "{t}"insn-codes.h "{t}"insn-config.h "{s}"regs.h ∂
"{s}"hard-reg-set.h "{s}"recog.h "{s}"flags.h {Configs}
"{o}"obstack.c.o ƒ ∂
"{s}"obstack.c "{s}"obstack.h
"{o}"optabs.c.o ƒ ∂
"{s}"optabs.c "{s}"rtl.h "{s}"tree.h "{s}"tree.def "{s}"real.h "{s}"flags.h ∂
"{t}"insn-flags.h "{t}"insn-codes.h "{s}"expr.h "{t}"insn-config.h "{s}"recog.h {Configs}
"{o}"print-tree.c.o ƒ ∂
"{s}"print-tree.c "{s}"tree.h {Configs}
"{o}"recog.c.o ƒ ∂
"{s}"recog.c "{s}"rtl.h "{t}"insn-config.h "{s}"recog.h "{s}"regs.h ∂
"{s}"hard-reg-set.h "{s}"real.h {Configs}
"{o}"regclass.c.o ƒ ∂
"{s}"regclass.c "{s}"rtl.h "{s}"hard-reg-set.h "{s}"flags.h ∂
"{s}"basic-block.h "{s}"regs.h "{t}"insn-config.h "{s}"recog.h {Configs}
"{o}"reload.c.o ƒ ∂
"{s}"reload.c "{s}"rtl.h "{t}"insn-config.h "{s}"recog.h "{s}"reload.h ∂
"{s}"regs.h "{s}"hard-reg-set.h "{s}"flags.h "{s}"real.h {Configs}
"{o}"reload1.c.o ƒ ∂
"{s}"reload1.c "{s}"rtl.h "{t}"insn-config.h "{s}"flags.h "{s}"regs.h ∂
"{s}"hard-reg-set.h "{s}"reload.h "{s}"recog.h "{s}"basic-block.h {Configs}
"{o}"rtl.c.o ƒ ∂
"{s}"rtl.c "{s}"rtl.h "{s}"obstack.h {Configs}
"{o}"rtlanal.c.o ƒ ∂
"{s}"rtlanal.c "{s}"rtl.h {Configs}
"{o}"sdbout.c.o ƒ ∂
"{s}"sdbout.c {Configs}
"{o}"stmt.c.o ƒ ∂
"{s}"stmt.c "{s}"rtl.h "{s}"tree.h "{s}"flags.h "{t}"insn-flags.h "{t}"insn-config.h ∂
"{s}"expr.h "{t}"insn-codes.h "{s}"regs.h "{s}"hard-reg-set.h {Configs}
"{o}"stor-layout.c.o ƒ ∂
"{s}"stor-layout.c "{s}"tree.h "{s}"rtl.h {Configs}
"{o}"stupid.c.o ƒ ∂
"{s}"stupid.c "{s}"rtl.h "{s}"hard-reg-set.h "{s}"regs.h {Configs}
"{o}"symout.c.o ƒ ∂
"{s}"symout.c "{s}"tree.h "{s}"symseg.h "{s}"rtl.h "{s}"gdbfiles.h {Configs}
"{o}"toplev.c.o ƒ ∂
"{s}"toplev.c "{s}"input.h "{s}"tree.h "{s}"c-tree.h "{s}"rtl.h "{s}"flags.h {Configs}
"{o}"tree.c.o ƒ ∂
"{s}"tree.c "{s}"tree.h "{s}"obstack.h "{s}"gvarargs.h "{s}"flags.h {Configs}
"{o}"varasm.c.o ƒ ∂
"{s}"varasm.c "{s}"rtl.h "{s}"tree.h "{s}"tree.def "{s}"real.h "{s}"flags.h ∂
"{s}"expr.h "{t}"insn-codes.h "{s}"hard-reg-set.h "{s}"obstack.h {Configs}
# Link GCC itself.
cc1 ƒƒ "{o}"toplev.c.o {CC1OBJECTS}
Link {LinkOptions} "{o}"toplev.c.o {CC1OBJECTS} ∂
{COMLIBS} ∂
-o cc1
cc1 ƒƒ "{machine}"Versions.r
Rez -rd -o cc1 "{machine}"Versions.r -append
# Build a performance measurement version. Toplev is the only file that has any
# calls to perf functions.
cc1p ƒƒ "{o}"toplev.c.po {CC1OBJECTS}
Link {LinkOptions} -l >LinkMap "{o}"toplev.c.po {CC1OBJECTS} ∂
"{Libraries}"Performlib.o {COMLIBS} ∂
-o cc1p
cc1p ƒƒ "{machine}"Versions.r
Rez -rd -o cc1p "{machine}"Versions.r -append
SHORTENOBJECTS = ∂
"{o}"shorten.c.o
"{o}"shorten.c.o ƒ "{s}"shorten.c
shorten ƒƒ {SHORTENOBJECTS}
Link {LinkOptions} {SHORTENOBJECTS} {COMLIBS} -o shorten
shorten ƒƒ "{machine}"Versions.r
Rez -rd -o shorten "{machine}"Versions.r -append